import React from "react";
import FVLayout from "../components/fvLayout";
const Home = React.lazy(() => import("../views/home"));
const ListManage = React.lazy(() => import("../views/listManage"));
const ProgressManage = React.lazy(() => import("../views/progressManage"));
const SignManage = React.lazy(() => import("../views/signManage"));
const Login = React.lazy(() => import("../views/login"));

export const siderRoutes = [
  {
    path: "/",
    element: (
      <FVLayout>
        <Home></Home>
      </FVLayout>
    ),
    meta: {
      title: "首页",
    },
  },
  {
    path: "/manage",
    meta: {
      title: '数据管理'
    },
    children: [
      {
        path: "/manage/list",
        element: (
          <FVLayout>
            <ListManage></ListManage>
          </FVLayout>
        ),
        meta: {
          title: "列表管理",
        },
      },
      {
        path: "/manage/progerss",
        element: (
          <FVLayout>
            <ProgressManage></ProgressManage>
          </FVLayout>
        ),
        meta: {
          title: "进度管理",
        },
      },
      {
        path: "/manage/sign",
        element: (
          <FVLayout>
            <SignManage></SignManage>
          </FVLayout>
        ),
        meta: {
          title: "点名管理",
        },
      },
    ],
  },
];

export const whiteRoutes = [
  {
    path: "/login",
    element: <Login></Login>,
    meta: {
      title: "登录",
    },
  },
];

export const routes = siderRoutes.concat(whiteRoutes);
